<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
    <title>查询</title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/search.css">
    <link rel="icon" href="images/logo.jpg" type="image/x-icon" />
    <script src="resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="resources/scripts/axure/axQuery.js"></script>
    <script src="resources/scripts/axure/globals.js"></script>
    <script src="resources/scripts/axutils.js"></script>
    <script src="resources/scripts/axure/annotation.js"></script>
    <script src="resources/scripts/axure/axQuery.std.js"></script>
    <script src="resources/scripts/axure/doc.js"></script>
    <style type="text/css">
         html{height:100%}    
         body{height:600px;margin-top:350px;margin-left: 50px;margin-right: 50px;padding:0px}  
         #container{
            overflow: hidden;
            height:100%;
            margin: 0;
            font-family: "微软雅黑";
        }
        #l-map{overflow: hidden;
            height:500px;
            margin: 0;
            font-family: "微软雅黑";}
		#r-result{width:100%;}

        .info {
        z-index: 999;
        width: auto;
        min-width: 22rem;
        padding: .75rem 1.25rem;
        margin-left: 1.25rem;
        position: fixed;
        top: 1rem;
        background-color: #fff;
        border-radius: .25rem;
        font-size: 14px;
        color: #666;
        box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);
    } 
    #allmap {height: 500px;width:100%;overflow: hidden;}
	dl,dt,dd,ul,li{
		margin:0;
		padding:0;
		list-style:none;
	}
	dt{
		font-size:14px;
		font-family:"微软雅黑";
		font-weight:bold;
		border-bottom:1px dotted #000;
		padding:5px 0 5px 5px;
		margin:5px 0;
	}
	dd{
		padding:5px 0 0 5px;
	}
	li{
		line-height:28px;
	}
    </style>
</head>
<body>
    <div id="head">
        <b>
            <div class="separt1"><div style="height: 10px;"></div><span class="logo">文化遗址系统</span></div>
            <div class="separt"><div style="height: 10px;"></div><a class="change" href="index.html"><span>主页</span></a></div>
            <div class="separt"><div style="height: 10px;"></div><a class="change" href="luxian.html"><span>路线</span></a></div>
            <div class="separt"><div style="height: 10px;"></div><a class="change" href="collect.html"><span>去收藏</span></a></div>
            <div class="separt"><div style="height: 10px;"></div><a class="change" href="box.html"><span>收藏夹</span></a></div>
        </b>
        <div id="allmap"></div>
	    <div id="r-result"></div>

        <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=GWKMwlzTUGmMqnKCp5rxq6nRsDmefBCW">//密钥
        </script>
        <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=GWKMwlzTUGmMqnKCp5rxq6nRsDmefBCW"></script>
        <script type="text/javascript" src="//api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
        <script type="text/javascript">
            var loc = location.href;
            var n1 = loc.length;
            var n2 = loc.indexOf("=");
            if (n2 >= 0 && n2 <= n1) {
                var n3 = loc.substring(n2 + 1);
                var word = n3;
                word=word+"遗址";
            }

            var map = new BMapGL.Map("allmap");            // 创建Map实例
            var poi=new BMapGL.Point(116.404, 39.915);
            map.centerAndZoom(poi, 11);
            map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放

            var a;
            var b;
            var local = new BMapGL.LocalSearch(map, {
                renderOptions: {map: map, panel: "r-result"}
            });
            local.search(word);
            map.addEventListener('click', function (e) {
                a=e.latlng.lng;
                b=e.latlng.lat;
            });

        </script>

</body>
</html>
